function reloadOptions(pid, target, model, selected, defaultVal, clear, field) {
    var pid = parseInt(pid);
    var field = typeof(field) == 'undefined' ? 'parent_id' : $.trim(field);
    var selected = typeof(selected) == 'undefined' ? '' : parseInt(selected);
    var defaultVal = typeof(defaultVal) == 'undefined' ? '' : $.trim(defaultVal);

    if (pid) {
        $.post('/opt', {pid: pid, model: model, selected: selected, field: field, defaultVal:defaultVal, _token: GV.TOKEN}, function (response) {
            target.html(response);
        });
    } else {
        target.html('<option value="">请选择</option>');
        clear.html('<option value="">请选择</option>');
    }

    if (typeof(clear) != 'undefined')
        clear.html('<option value="">请选择</option>');
}
